<!-- link wordpress account form modal -->
<div class="modal fade load-wp-form" ng-controller="wordpressFormCtrl">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title text-center">
					<i class="fa fa-wordpress"></i>
					Connect your wordpress account
				</h4>
			</div>

			<div class="modal-body">
				<div ng-class="wpform_error ? 'alert alert-danger': 'alert alert-success'" role="alert" ng-show="wpform_alert">
					{{wpform_message}}
				</div>
	
			    <form class="form-horizontal" autocomplete="off" name="wpLinkForm">
			        <div class="form-group">
			            <label for="title" class="col-sm-2 control-label">Blog Title</label>
			            <div class="col-sm-10">
			                <input type="text" ng-model="wpForm.title" name="title" class="form-control" placeholder="blog title" required>
			                <small class="label label-danger" ng-show="wpLinkForm.title.$error.required">
			                	Blog ttitle is required.
			                </small>
			            </div>
			        </div>

			        <div class="form-group">
			            <label for="link" class="col-sm-2 control-label">Blog Link</label>
			            <div class="col-sm-10">
			                <input type="url" ng-model="wpForm.link" name="link" class="form-control" placeholder="blog link" required validate-url>
			                <small class="label label-danger" ng-show="wpLinkForm.link.$error.required">
			                	Wordpress Link is required.
			                </small>
			                <small class="label label-danger" ng-show="wpLinkForm.link.$error.url">
			                	Please Enter a valid Wordpress Link.
			                </small>
			            </div>
			        </div>

			        <div class="form-group">
			            <label for="username" class="col-sm-2 control-label">Username</label>
			            <div class="col-sm-10">
			                <input type="text" ng-model="wpForm.username" name="username" class="form-control" placeholder="username" required>
			                <small class="label label-danger" ng-show="wpLinkForm.username.$error.required">
			                	Wordpress username is required.
			                </small>
			            </div>
			        </div>

			        <div class="form-group">
			            <label for="password" class="col-sm-2 control-label">Password</label>
			            <div class="col-sm-10">
			                <input type="password" ng-model="wpForm.password" name="password" class="form-control" placeholder="password" required>
			                <small class="label label-danger" ng-show="wpLinkForm.password.$error.required">
			                	Wordpress password is required.
			                </small>
			            </div>
			        </div>
			    </form>
			</div>

			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				<button type="button" class="btn btn-primary" ng-disabled="wpLinkForm.$invalid" ng-click="saveWordpressAccount(wpForm)">
					Submit
					<span ng-show="wpform_loading" class="animate-if">
						<i class="fa fa-spinner fa-spin"></i>
					</span>
				</button>
			</div>
		</div>
	</div>
</div>